The webpack-remove-block-loader
is Webpack loader to strip blocks of code marked by special comment tags. Useful for removing code that you don’t want in your production webpack bundle (e.g. verbose console warnings, etc).
Example: the code in side /* PrdDeletion:start */
and /* PrdDeletion:end */
will be removed in PRD bundle.
/* devblock:start */
console.log(`base URL is ${base}`);
/* devblock:end */
}
Run the npm uninstall —save-dev for all below packages:
Remove the below LESS config blog from Webpack config in configs\webpack\common.js file:
{
"test": /\.(js|jsx|ts|tsx)$/,
//exclude: /node_modules/,
"use": [
{
"loader": 'webpack-remove-block-loader',
"options": {
"active": !devMode,
}
}
]
},
Remove all code blocks which starting with /* develblock:start */
and end with /* develblock:end */